package com.hjs.pacloudservice.controller;

import com.hjs.pacloudservice.service.RedisService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @auther hanjinsong
 * @create 2019-08-06 16:29
 */
@Slf4j
@Component
public class Runner implements CommandLineRunner {

    @Autowired
    private RedisService redisService;

    @Override
    public void run(String... strings) throws Exception {
        log.info("开始添加缓存-----------------");
        redisService.init();
        log.info("添加缓存成功-----------------");
    }
}
